Numbers
Numerical (Data) Types  To work properly with most FaceWare modules, a compiler must support numbers based on the IEEE or SANE format.  This requirement is met for all of the compilers that we directly support, but each language has its own way of naming these numerical types that does not always make clear the number of bytes used by each type.  Moreover, different compilers supporting the same language may not even agree on type names!  The following table should help prevent any confusion.  The numbers 1 to 12 are sometimes passed to FaceWare modules to indicate the "data type" of variables.

Numerical Type       C,C++     FORTRAN       Pascal
1. 1-byte integer    char      integer*1     signedByte
2. 2-byte integer    short     integer*2     integer
3. 4-byte integer    long      integer*4     longint
4. 8-byte integer    comp      comp          computational
5. 4-byte real      float      real*4        real

6. 8-byte real   double(WC)     real*8       double(LP,WP)
                 short double(LC,MC)         double(MP)†
                 double(SC,MC)†

7. 10-byte real  extended(WC)   real*10(LF)  extended(LP,WP)
   w/o 68881     long double(LC)*            double(MP)††
                 long double(SC,MC)
                 double(SC,MC)††

8. 12-byte real  extended(WC)   real*12      extended(LP,WP)
   w/ 68881      long double(LC)*            double(MP)††
                 long double(SC,MC)
                 double(SC,MC)††

12.12-byte real  long double(LC)**

† if "8-byte doubles" on
†† if "8-byte doubles" off
* if "Native FP" on
** if "Native FP" off  (THINK C "universal")

Array Types  Some modules require programmers to specify the data type of arrays.  This data type is a combination of one of the integers 1 to 12 from the above table, plus a "block type" given by the sign of this integer.  The block type refers to how the numbers in a two-dimensional array are arranged in memory relative to "rows" and "columns" displayed or used by the module.  Positive block types (+1 to +12) indicate that the array consists of blocks of rows (R1C1, R1C2, R1C3... are contiguous), and negative block types (-1 to -12) indicate that the array consists of blocks of columns (R1C1, R2C1, R3C1... are contiguous in memory).
  Determining the proper block type (the sign of the data type) to pass to a module depends on which index of the 2-dimensional array corresponds to rows vs. columns, and the language in use.  For example, given a real*8 FORTRAN array dimensioned as "myArray(10,5)" and an equivalent C or Pascal array also dimensioned as "myArray[10,5]", the data type passed to a module could be either ±6:
  non-FORTRAN  "myArray[10,5]" = 10 blocks of 5 numbers each:

  • use "+6" to denote 10 rows of 5 columns each
  
• use "-6" to denote 10 columns of 5 rows each
  vs. FORTRAN  "myArray(10,5)" = 5 blocks of 10 numbers each:
  
• use "+6" to denote 5 rows of 10 columns each

  • use "-6" to denote 5 columns of 10 rows each